package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmy.cultivate.entity.Grade;
import com.xmy.cultivate.entity.Staff;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.mapper.AdminMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 员工 服务类
 * </p>
 *
 * @author min
 * @since 2022-07-26
 */
public interface IStaffService extends IService<Staff> {

    public abstract boolean saveTo(Staff staff);

    public abstract boolean updateTo(Staff staff);

    public abstract Staff findOneById(Long id);

    public abstract Integer staffCountByPhone(String phone);

    Staff getOneById(Long id);

    public abstract IPage<Staff> findAll(IPage<?> page, Wrapper wrapper);

    /**
     * 获取编号和名字
     *
     * @param id
     * @return
     */
    String getNameById(Long id);

    /**
     * 获取差集 未排名的教师列表
     *
     * @param wrapper
     * @return
     */
    Page<Staff> listCollection(IPage<?> page, Wrapper wrapper);

    Staff getOneForAdminid(Long adminId);

    List<Staff> working(Wrapper wrapper);

    List<Staff> staffAnalyse(String quarterNum,String yearPart,String roleId,String name,String schoolId,String subjectId);


    List<String> getSiginSubjects(Staff staff, Integer lessonType);

    Integer getSiginSubjectsType(Staff staffOld, Integer lessonType);

    List<Long> getTeacherIdForSubjects(String subjectsIds);
}
